From 37f28136dd66d057faa9b5c3a1ce05585f118304 Mon Sep 17 00:00:00 2001 From: justbur Date: Sun, 6 Dec 2015 13:29:25 -0500 Subject: [PATCH] Tweak display of key sequence in one case This is for the C-h commands when the which-key message is not shown in the echo area but the echo-keystrokes prefix is --- which-key.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/which-key.el b/which-key.el index 3c9c117eaf5..059cceda9ae 100644 --- a/which-key.el +++ b/which-key.el @@ -1527,7 +1527,7 @@ area." (if (= n 4) str (format " %s" prefix-arg)))) (_ (format " %s" prefix-arg)))))))) -(defun which-key--full-prefix (prefix-keys &optional -prefix-arg) +(defun which-key--full-prefix (prefix-keys &optional -prefix-arg dont-prop-keys) "Return a description of the full key sequence up to now, including prefix arguments." (let* ((left (eq which-key-show-prefix 'left)) @@ -1538,7 +1538,7 @@ including prefix arguments." prefix-keys)) (dash (if (and which-key--current-prefix (null left)) "-" ""))) - (if (eq which-key-show-prefix 'echo) + (if (or (eq which-key-show-prefix 'echo) dont-prop-keys) (concat str dash) (concat (which-key--propertize-key str) (propertize dash 'face 'which-key-key-face))))) @@ -1753,7 +1753,7 @@ after first page." prefix) if `which-key-use-C-h-commands' is non nil." (interactive) (let* ((prefix-keys (key-description which-key--current-prefix)) - (full-prefix (which-key--full-prefix prefix-keys current-prefix-arg)) + (full-prefix (which-key--full-prefix prefix-keys current-prefix-arg t)) (prompt (concat (when (string-equal prefix-keys "") (propertize " Top-level bindings" 'face 'which-key-note-face)) full-prefix -- 2.30.2